package net.maku.module.organization.vo;

import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.v3.oas.annotations.media.Schema;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;

import net.maku.framework.common.utils.DateUtils;
import net.maku.module.business.entity.DictionariesSubsetEntity;
import net.maku.module.organization.entity.JobLevelEntity;
import net.maku.module.organization.entity.OrganizationEntity;
import net.maku.module.organization.entity.PositionTypeEntity;

import java.util.Date;

/**
 * 业务_职位管理
 *
 * @author
 */
@Data
@Schema(description = "业务_职位管理")
public class PositionVO implements Serializable, TransPojo {
    private static final long serialVersionUID = 1L;

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "创建人")
    private Long creator;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createTime;

    @Schema(description = "更新人")
    private Long updater;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date updateTime;

    @Schema(description = "版本")
    private Long version;

    @Schema(description = "删除")
    private Integer deleted;

    @Schema(description = "名称")
    private String name;

    @Schema(description = "编码")
    private String code;

    @Trans(type = TransType.SIMPLE, target = OrganizationEntity.class, fields = "abbreviation", ref = "organName")
    @Schema(description = "所属组织")
    private Long organizationId;
    private String organName;

    @Trans(type = TransType.SIMPLE, target = PositionTypeEntity.class, fields = "name", ref = "typeName")
    @Schema(description = "职位类别")
    private Long positionType;
    private String typeName;

    @Trans(type = TransType.SIMPLE, target = DictionariesSubsetEntity.class, fields = "name", ref = "jobName")
    @Schema(description = "对应职务")
    private Long jobId;
    private String jobName;

    @Trans(type = TransType.SIMPLE, target = JobLevelEntity.class, fields = "name", ref = "jobLevelName")
    @Schema(description = "对应职级")
    private Long jobLevel;
    private String jobLevelName;

    @Schema(description = "职位描述")
    private String description;

    @Schema(description = "是否启用")
    private Integer isEnable;


}